package com.example.springboottemplate.Control.Response;


import lombok.Data;

/*
* 服务器统一响应
*/

@Data
public class RedisClientTemplate<T>{
    private int code;//状态码
    private Status status = Status.Success;//服务器是否响应成功
    private String msg;//信息
    private T data = null;//数据


    public RedisClientTemplate(int code, Status status, String msg, T data) {
        this.code = code;
        this.status = status;
        this.msg = msg;
        this.data = data;
    }

    public RedisClientTemplate(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public RedisClientTemplate(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public RedisClientTemplate(int code, T data) {
        this.code = code;
        this.data = data;
    }

    public RedisClientTemplate() {
    }


}
